package org.gavin.core.exception;


import org.gavin.core.domain.Status;
import org.gavin.core.enums.CommonStatus;

public class DataException  extends BaseException{

    public DataException(String module, Integer code, Object args, String msg) {
        super(module,code,args,msg);
    }


    public static <T extends Status> DataException le(T status, String module, Object args ){
        return new DataException(module,status.getCode(),args,status.getMsg());
    }

    public static <T extends Status> DataException le(T status){
        return new DataException(null,status.getCode(),null,status.getMsg());
    }
}
